#include<iostream>
using namespace std;
typedef long long ll;
ll quick_pow(ll n, ll p)
{
	ll ret = 1;
	while (p)
	{
		if (p & 1) ret = ret * n;
		n = n * n;
		p >>= 1;
	}
	return ret;
}
int main()
{
	ll n, p;cin >> n >> p;
	ll t = quick_pow(n, p);
	cout << t << endl;
	return 0;
}